/**
 * @file     TitereHelper.h
 * @brief    This header defines necessary methods in titere.
 *
 * @author   Franco Riberi
 * @email    fgriberi AT gmail.com
 *
 * Contents: Header file for titere providing necessary methods
 *
 * System:   titere: Target Ideal TEmperature Rna Expression
 * Language: C++
 *
 * @date February 5, 2015
 *
 * Copyright (C) 2015 Franco Riberi, FuDePAN
 *
 * This file is part of the titere.
 *
 * Titere is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Titere is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with titere. If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef TITERE_HELPER_H
#define TITERE_HELPER_H

#include <biopp/biopp.h>
#include "titere/Types.h"

namespace NSTitere
{

namespace NSHelperFuntion
{
/**
 * @brief Checks a specific position of the sequence with a given nucleotide
 *
 * @param sequence The input sequence
 * @param pos      The specific position
 * @param nuc      The specific nucleotide
 * @return True if sequence[pos] == nuc, false otherwise
 */
bool checkNucleotide(const biopp::NucSequence& sequence, Position pos, Nucleotide nuc);

/**
 * @brief Counts a specific nucleotide in a specific range
 *
 * @param from     Initial range value
 * @param to       Final range value
 * @param sequence The input sequence
 * @param nuc      The specific nucleotid
 * @return the amount of nucleotides
 */
NucleotidsAmount countNucleotide(Position from, Position to, const biopp::NucSequence& sequence, Nucleotide nuc);

} //NSHelperFuntion
} //NSTitere

#endif /* TITERE_HELPER_H */